<h1>Sections</h1>
<table class="table table-striped">
  <thead>
    <tr>
      <th>Name</th>
      <th>Content count</th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    <% @sections.each do |section| %>
      <tr>
        <td><%= link_to section.name, section_path(section) %></td>
        <td><%= section.contents_count %></td>
        <td>
          <%= link_to 'Edit', edit_section_path(section), :class => 'btn btn-mini' %>
          <%= link_to 'Destroy', section_path(section), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= link_to 'New', new_section_path, :class => 'btn btn-primary' %>
